/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.synjones.zeus.model;

import lombok.Data;

import java.io.Serializable;
@Data
public class ExReqBean<T> implements Serializable {

    private String organizationCode;
    private String magic;
    private String ticket;
    private String ip;
    private String deviceInfo;
    private String imei;
    private String imsi;
    private T data;

    public ExReqBean() {
    }

    public ExReqBean(String organizationCode) {
        this.organizationCode = organizationCode;
    }

    public ExReqBean(String organizationCode, T t) {
        this.organizationCode = organizationCode;
        this.data = t;
    }

    public static ExReqBean copyFrom(ExReqBean exReqBean) {
        ExReqBean reqBean = new ExReqBean();
        reqBean.setOrganizationCode(exReqBean.getOrganizationCode());
        reqBean.setMagic(exReqBean.getMagic());
        reqBean.setTicket(exReqBean.getTicket());
        reqBean.setDeviceInfo(exReqBean.getDeviceInfo());
        reqBean.setImei(exReqBean.getImei());
        reqBean.setImsi(exReqBean.getImsi());
        reqBean.setIp(exReqBean.getIp());
        return reqBean;
    }


    public static ExReqBean copyAllFrom(ExReqBean exReqBean) {
        ExReqBean resultBean = copyFrom(exReqBean);
        resultBean.setData(exReqBean.getData());
        return resultBean;
    }


}
